//设备新增
import {sysDictDataList} from '/@/api/centerControl/pubilc';
import { validateNumberFixed4 } from '/@/utils/validators';
import { i18n } from '/@/locales/i18n';
const $t = i18n.global.t;

export default function (data: any, state: boolean) {
	const array = [
		{
			type: 'slot',
			slotName: 'tint1',
			label: $t('l4vGAiubhrTaPWe5vDq1o'),
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
		},
		{
			type: 'input',
			label: $t('e2M2f6DnfS46ORyK99B8j'),
			key: 'v_LegalName',
			value: data.v_LegalName || '',
			rules: [{ required: true, message: $t('7LkKYu4Cp4ATlKfAm3kZ'), trigger: ['blur', 'change'] }],
			disabledStyle: state,
		},

		{
			type: 'input',
			label: $t('20zgRGd39OxBmVzIiuI6y'),
			key: 'v_StandardCode',
			value: data.v_StandardCode || '',
			rules: [{ required: true, message: $t('7LkKYu4Cp4ATlKfAm3kZ'), trigger: ['blur', 'change'] }],
			disabledStyle: state,
		},
		{
			type: 'input',
			label: $t('v8u211M9G1IudgJeyszph'),
			key: 'v_ScopeApplication',
			value: data.v_ScopeApplication || '',
			rules: [{ required: true, message: $t('7LkKYu4Cp4ATlKfAm3kZ'), trigger: ['blur', 'change'] }],
			disabledStyle: state,
		},
		{
			type: 'date',
			label: $t('dPa9o1Img9JKUeZo9Kyg'),
			key: 'd_PublicationDate',
			value: data.d_PublicationDate || '',
			placeholder: $t('dPa9o1Img9JKUeZo9Kyg'),
			labelWidth: 110,
			dateOption: {
				dataFormat: 'YYYY-MM-DD',
			},
			rules: [{ required: true, message: $t('key_0'), trigger: ['blur', 'change'] }],
			disabledStyle: state,
		},
		{
			type: 'date',
			label: $t('dJuTlGjvm740k0TyolZpm'),
			key: 'd_EffectiveDate',
			value: data.d_EffectiveDate || '',
			placeholder: $t('dJuTlGjvm740k0TyolZpm'),
			dateOption: {
				dataFormat: 'YYYY-MM-DD',
			},
			rules: [{ required: true, message: $t('key_0'), trigger: ['blur', 'change'] }],
			disabledStyle: state,
		},
		{
			type: 'input',
			label: $t('9RLaVEiJf1Z1Qv15o6Kll'),
			key: 'v_Remake',
			value: data.v_Remake || '',
			disabledStyle: state,
		},
		{
			type: 'slot',
			slotName: 'tint1',
			label: $t('43dR1uAe2vCuwvuMQO7r'),
			size: {
				xs: 24,
				sm: 24,
				md: 24,
				lg: 24,
				xl: 24,
			},
		},
		{
			type: 'select',
			label: $t('ygifzjtPthjsS8u7gmujA'),
			key: 'n_LegalTypeId',
			value: data.v_LegalTypeName || '',
			placeHolder: $t('ehhbmuhU8y6pDtkJzLPh'),
			selectOption: {
				type: 'remote',
				loading: false,
				requestMethod: sysDictDataList,
				searchKey: 'value',
				value: 'id',
				label: 'value',
				otherParams: {
					typeCode: 'flqdType78',
				},
			},
			rules: [{ required: true, message: $t('key_0'), trigger: ['blur', 'change'] }],
			disabledStyle: state,
		},

		// {
		// 	type: 'slot',
		// 	slotName: 'tint1',
		// 	label: $t('s4KbtSrTfOzuWyRcHgTxx'),
		// 	size: {
		// 		xs: 24,
		// 		sm: 24,
		// 		md: 24,
		// 		lg: 24,
		// 		xl: 24,
		// 	},
		// },

		{
			type: 'slot',
			slotName: 'File',
		},
		{
			type: 'slot',
			slotName: 'Detail',
		},
	];
	return array;
}
